package com.zhoug.ocr.textin.http.core;

import com.zhoug.common.utils.JsonUtils;

/**
 * @Author: zhoug
 * @Date: 2023/2/20
 * @Description:
 */
public class TextInResponse<T> {
    private int code;//错误码，详见“错误码说明”
    private String message;//错误信息
    private String duration;//服务时间消耗，单位是毫秒(ms)。
    private String version;//接口版本号。
    private T result;//具体数据

    public transient static final int STATUS_SUCCESS=200;
    public transient static final int STATUS_COOKIE_TIME_OUT=444;


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return JsonUtils.toJson(this);
    }
}
